// ****************************************************************************
//
// Logic 5: Inside Voodoo Girl's Hut
//
// ****************************************************************************

#include "defines.txt"

if (new_room) {

      load.pic(room_no);
      draw.pic(room_no);
      discard.pic(room_no);

      load.view(100);
      set.view(ego,100);
      universe=3;
      step.size(ego,universe);

      set.horizon(1);

      draw(ego);
      show.pic();
      print("Due to the demo nature of this program, you still have to type \"make <potion name>\"");

  if (cauldron_on_stove){
    animate.obj(o2);
    load.view(54);
    set.view(o2,54);
    position(o2, 23,127);
    draw(o2);
    }

}

if (said("look")) {
  print("This is your apartment, kitchen, and top secret hoodoo lab.");
  if (!cauldron_on_stove){
     print("It looks as if troublesome spirits have stolen your cauldron!");
     }
  }


if (controller(left_click)){
    if(obj.in.box(ego, 121, 141, 142, 161)){ //Exit
       load.view(0);
       set.view(ego,0);
       new.room(2);
    }

    if(obj.in.box(ego, 94,8, 104,56) &&
       controller(left_click)){ //Cookbook
       print("A Beginner's Guide to Witchcraft, Hoodoo, and Rootworking:");
       print("by Loa Legba, PhD.");
       if (!has("cauldron") &&
           !cauldron_on_stove) {
          print("STEP ONE:  Get an iron cauldron.");
          }
       if (!has("sleep moss") && !has("poison")){
          print("STEP TWO:  Gather your ingredients from the plants and fungi that grow around you.");
          }
       if (!cauldron_on_stove){
          print("STEP THREE:  Go home and put the cauldron on your stove.  Add up to three ingredients from your spice rack to the cauldron.");
          }
       else{
          print("LASTLY:  Push the cook button, and you'll have a potion, a poison, or special brew.");
          }
    }
}

if ((said("use","cauldron") ||
     said("use","cauldron","stove") ||
     said("put","cauldron","stove"))) {
       if (has("cauldron")) {
          drop("cauldron");
          set(cauldron_on_stove);
          animate.obj(o2);
          load.view(54);
          set.view(o2,54);
          position(o2, 23,127);
          draw(o2);
          }
     }

if (said("make","troglodyte")){
    print("test message");
    }


if (said("make","sleep potion")) {
    if (cauldron_on_stove && has("sleep moss")) {
        if (has("sleep potion")) {
           print("You already have enough.");
           }
        else {
           sleep_moss-=1;
           get("sleep potion");
           print("You whip up a batch of sleep potion.");
           }
    }
    else {
        print("First you get the supplies...");
        print("Then you make the potions...");
        print("Then you get the women.");
        }
}


if (said("make","poison")) {
    if (cauldron_on_stove && has("poison berries")) {
    if (has("poison")) {
      print("You already have enough.");
      }
       else {
      poison_berries-=1;
      get("poison");
      print("You concoct a horrific poison.");
      }
      }
    else {
      print("First you get the supplies...");
      print("Then you make the potions...");
      print("Then you get the women.");
      }
    }


return();